package com.utills;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class ReflectUtil {

	@SuppressWarnings("rawtypes")
	public static  Class getEntity(Class c){
		Type type=c.getGenericSuperclass();
		if(!(type instanceof ParameterizedType)){
			return Object.class;
		} 
		ParameterizedType pt = (ParameterizedType)type;
	    return (Class)pt.getActualTypeArguments()[0];
	}
}
